package com.asiainfo.ncrm.fragment;

import com.asiainfo.ncrm.R;

import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.webkit.WebView;
import android.webkit.WebViewClient;

public class FragmentPage4 extends Fragment{

	 private WebView webview;
		@Override
		public View onCreateView(LayoutInflater inflater, ViewGroup container,Bundle savedInstanceState) {	
			return inflater.inflate(R.layout.fragment_4, null);		
		}	
		@Override
		public void onActivityCreated(Bundle savedInstanceState) {
			// TODO Auto-generated method stub
			setView();
			setLitener();
			super.onActivityCreated(savedInstanceState);
			
		}
		private void setLitener() {
			// TODO Auto-generated method stub
			webview.loadUrl("http://www.sogou.com");
			
			
			
			webview.setWebViewClient(new WebViewClient(){       
		        public boolean shouldOverrideUrlLoading(WebView view, String url) {       
		            view.loadUrl(url);       
		            return true;       
		        }       
		}); 

		}
		private void setView() {
			// TODO Auto-generated method stub
			webview = (WebView)getView().findViewById(R.id.webView1);
			 
			
			
		}
}